# 讲解 写字节流和byteIO时供学生请求使用
from flask import Flask
import base64

app = Flask(__name__)

@app.route('/')
@app.route('/get_image_base64')
def get_image_base64():
    with open('10红包.JPG', 'rb') as f:
        img_str = base64.b64encode(f.read())
        return img_str


app.run(threaded=True, host='0.0.0.0', port=8001)